function checkLogin(result){
	
	if(result == "0"){
		alert("該帳號已在其他裝置登入，系統將登出!");
		logout();
		return false;
	}else{
		return true;
	}
	
}

function logout(){
	$.post(
		config.logoutPath,{},
		function(result) {
			location.href="login.php";
		}
	); 
}